Always set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
authorOwen Taylor <otaylor@redhat.com>
Tue, 9 Apr 2002 22:41:37 +0000 (22:41 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Tue, 9 Apr 2002 22:41:37 +0000 (22:41 +0000)
Tue Apr  9 18:34:58 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
        set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
        even if we aren't currently in a resize container... we need
        this to properly handle size changes to widgets that are
        being moved from one heirarchy to another. (#78226)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcontainer.c

index f909599722fe7aa8205ec94658f4cfd3adf30941..c643fc778b956213d542cccde2c16f8b54df89a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Tue Apr  9 18:34:58 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
+       set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
+       even if we aren't currently in a resize container... we need
+       this to properly handle size changes to widgets that are
+       being moved from one heirarchy to another. (#78226)
+
 Tue Apr  9 21:41:24 2002  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #78110
index f909599722fe7aa8205ec94658f4cfd3adf30941..c643fc778b956213d542cccde2c16f8b54df89a4 100644 (file)
@@ -1,3 +1,11 @@
+Tue Apr  9 18:34:58 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
+       set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
+       even if we aren't currently in a resize container... we need
+       this to properly handle size changes to widgets that are
+       being moved from one heirarchy to another. (#78226)
+
 Tue Apr  9 21:41:24 2002  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #78110
index f909599722fe7aa8205ec94658f4cfd3adf30941..c643fc778b956213d542cccde2c16f8b54df89a4 100644 (file)
@@ -1,3 +1,11 @@
+Tue Apr  9 18:34:58 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
+       set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
+       even if we aren't currently in a resize container... we need
+       this to properly handle size changes to widgets that are
+       being moved from one heirarchy to another. (#78226)
+
 Tue Apr  9 21:41:24 2002  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #78110
index f909599722fe7aa8205ec94658f4cfd3adf30941..c643fc778b956213d542cccde2c16f8b54df89a4 100644 (file)
@@ -1,3 +1,11 @@
+Tue Apr  9 18:34:58 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
+       set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
+       even if we aren't currently in a resize container... we need
+       this to properly handle size changes to widgets that are
+       being moved from one heirarchy to another. (#78226)
+
 Tue Apr  9 21:41:24 2002  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #78110
index f909599722fe7aa8205ec94658f4cfd3adf30941..c643fc778b956213d542cccde2c16f8b54df89a4 100644 (file)
@@ -1,3 +1,11 @@
+Tue Apr  9 18:34:58 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
+       set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
+       even if we aren't currently in a resize container... we need
+       this to properly handle size changes to widgets that are
+       being moved from one heirarchy to another. (#78226)
+
 Tue Apr  9 21:41:24 2002  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #78110
index f909599722fe7aa8205ec94658f4cfd3adf30941..c643fc778b956213d542cccde2c16f8b54df89a4 100644 (file)
@@ -1,3 +1,11 @@
+Tue Apr  9 18:34:58 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
+       set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
+       even if we aren't currently in a resize container... we need
+       this to properly handle size changes to widgets that are
+       being moved from one heirarchy to another. (#78226)
+
 Tue Apr  9 21:41:24 2002  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #78110
index bef2491cbbe1dadfd0c01f0c506344a42acf5391..f35ab73254433a758688af47eb3f6bff10a48545 100644 (file)
@@ -1012,25 +1012,26 @@ void
 _gtk_container_queue_resize (GtkContainer *container)
 {
   GtkContainer *resize_container;
+  GtkWidget *widget;
   
   g_return_if_fail (GTK_IS_CONTAINER (container));
 
+  widget = GTK_WIDGET (container);
   resize_container = gtk_container_get_resize_container (container);
   
-  if (resize_container)
+  while (!GTK_WIDGET_ALLOC_NEEDED (widget) || !GTK_WIDGET_REQUEST_NEEDED (widget))
     {
-      GtkWidget *widget = GTK_WIDGET (container);
+      GTK_PRIVATE_SET_FLAG (widget, GTK_ALLOC_NEEDED);
+      GTK_PRIVATE_SET_FLAG (widget, GTK_REQUEST_NEEDED);
+      if ((resize_container && widget == GTK_WIDGET (resize_container)) ||
+         !widget->parent)
+       break;
       
-      while (!GTK_WIDGET_ALLOC_NEEDED (widget) || !GTK_WIDGET_REQUEST_NEEDED (widget))
-       {
-         GTK_PRIVATE_SET_FLAG (widget, GTK_ALLOC_NEEDED);
-         GTK_PRIVATE_SET_FLAG (widget, GTK_REQUEST_NEEDED);
-         if (widget == GTK_WIDGET (resize_container))
-           break;
-         
-         widget = widget->parent;
-       }
+      widget = widget->parent;
+    }
       
+  if (resize_container)
+    {
       if (GTK_WIDGET_VISIBLE (resize_container) &&
          (GTK_WIDGET_TOPLEVEL (resize_container) || GTK_WIDGET_REALIZED (resize_container)))
        {